function showEdit() {
    $("#editPassword").modal("show");
}


function editPassword() {
    var oldPassword = $("#oldPassword").val();
    var newPassword = $("#newPassword").val();
    var checkPassword = $("#checkPassword").val();

    if (newPassword === checkPassword) {
        $.ajax({
            type: "GET",
            url: "password/edit",
            dataType: "json",
            data: {oldPassword:oldPassword, newPassword:newPassword, checkPassword:checkPassword},
            success: function (data) {
                if (data.res == 1) {
                    alert("更新成功");
                    $("#editPassword").modal("hide");
                }else {
                    alert("更新失败:" + data.msg);
                }
            },
            error: function () {
                alert("请求错误");
            }
        })
    }else {
        alert("两次密码输入不一致");
        return;
    }
}